home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / dev / c / RConfig.lha / RConfig_v1.1 / src / gtbsup.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-10  |  980 b   |  42 lines

  1. /*
  2.  * RConfig -- Replacement Library Configuration
  3.  *   Copyright 1992 by Anthon Pang, Omni Communications Products
  4.  *
  5.  * Source File: gtbsup.c
  6.  * Description: Support functions for use with GadToolsBox generated source
  7.  * Comments: "Lifted" from GadToolsBox source :-)
  8.  */
  9.  
  10. #include <exec/types.h>
  11. #include <dos/dos.h>
  12. #include <intuition/intuition.h>
  13. #include <clib/intuition_protos.h>
  14. #include <clib/gadtools_protos.h>
  15.  
  16. extern struct Gadget *IObject;
  17. extern ULONG IClass;
  18. extern UWORD Code;
  19. extern UWORD Qualifier;
  20.  
  21. long ReadIMsg(struct Window *iwnd) {
  22.     struct IntuiMessage *imsg;
  23.  
  24.     if (imsg = GT_GetIMsg(iwnd->UserPort)) {
  25.  
  26.         IClass    = imsg->Class;
  27.         Qualifier = imsg->Qualifier;
  28.         Code      = imsg->Code;
  29.         IObject   = imsg->IAddress;
  30.  
  31.         GT_ReplyIMsg(imsg);
  32.  
  33.         return TRUE;
  34.     }
  35.     return FALSE;
  36. }
  37.  
  38. void ClearMsgPort(struct MsgPort *mport) {
  39.     struct IntuiMessage *msg;
  40.     while (msg = GT_GetIMsg(mport)) GT_ReplyIMsg(msg);
  41. }
  42.